package org.jeecg.modules.storage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.storage.entity.BussStorageNoticeMaterial;
import org.jeecg.modules.storage.vo.BussStorageNoticeMaterialVo;

import java.util.List;

/**
 * @Description: 入库通知单原料单
 * @Author: jeecg-boot
 * @Date:   2024-06-18
 * @Version: V1.0
 */
public interface BussStorageNoticeMaterialMapper extends BaseMapper<BussStorageNoticeMaterial> {

	/**
	 * 通过主表id删除子表数据
	 *
	 * @param mainId 主表id
	 * @return boolean
	 */
	public boolean deleteByMainId(@Param("mainId") String mainId);

  /**
   * 通过主表id查询子表数据
   *
   * @param mainId 主表id
   * @return List<BussStorageNoticeMaterial>
   */
	public List<BussStorageNoticeMaterialVo> selectByMainId(@Param("mainId") String mainId);

	/**
	 * 通过采购单查询物料
	 * @param procurementId
	 * @param materialId
	 * @return
	 */
	BussStorageNoticeMaterial selectProcrement(@Param("procurementId") String procurementId,@Param("materialId") String materialId,@Param("storehouse") String storehouse);
}
